home *** CD-ROM | disk | FTP | other *** search
- C64 Emulators standard files - overview.
-
- This section shows the "normal" files used by each emulator.
-
-
- Program File type Identification Contents
- (name or method)
-
- c64.zip (PC) disk image VC1541.000 683 pcs 256-byte sectors
- tape image - not used
-
- C64S (PC) basic rom } contains binary data for:
- kernel rom }- romcode.c64 VC1541 (16384 bytes), chargen
- chargen rom } (4096),basic (8192) and kernel
- disk drive rom} (8192) = total 36864 bytes
- program - not used
- disk image 09c *.d64 683 pcs 256-byte sectors
- 09a,b testdisk.d64
- tape image *.t64 ?
-
- Note: the kernel part is modified.
-
- c64sally.zip basic rom A000BFFF.64F 8194 bytes of binary data (1)
- (PC) kernel rom D000DFFF.64P 8194 bytes of binary data (1)
- chargen rom E000FFFF.64P 4098 bytes of binary data (1)
- disk drive rom - not used
- program *.64P C64 program with load address
- also SEQ files via *.64S
- disk image - not used
- tape image - not used
-
- pc64*.zip basic rom *.64B 8192 bytes of binary data
- (PC) kernel rom *.64K 8192 bytes of binary data
- chargen rom *.64C 4096 bytes of binary data
- module at $8000 *.64M 8192 or 16384 bytes of binary
- data (8K at $A000 = *.64B)
- disk drive rom VC1541.64D 16384 bytes of binary data
- program *.P00 C64 program with load address
- preceded by 24 byte header.
- SEQ data file *.S00 same as *.P00 with different
- USR data file *.U00 | extensions. The 00 can be
- DEL data file *.D00 | any numbers if the 16-to-8
- REL data file *.R00 | mapping leads to duplicates.
- disk image *.D64 683 pcs 256-byte sectors, plus
- optionally 683 bytes error info
- tape image - not used
-
- c64.lzh (ST) basic rom c64/_basic 8192 bytes of binary data
- kernel rom c64/_kernal 8192 bytes of binary data
- chargen rom c64/_font 4096 bytes of binary data
- disk drive rom - not used
- program - C64 program with load address
- disk image - not used
- tape image - not used
-
- x64 (UNIX) basic rom basic 8192 bytes of binary data (2)
- kernel rom kernel 8192 bytes of binary data (2)
- chargen rom - not used
- disk drive rom - not used
- program - C64 program with load address
- disk image magic header 64 byte magic header and
- 683 pcs 256-byte sectors
- tape image - not used
- rom module filename 8192 or 16384 byte cartridge,
- stored in binary format
- ram image ram RAMSIZE + 4103
- (x64 will load a ram image, eg. "the contents of RAM as
- in warm start" at startup, if one exists)
- Only the RAM is loaded at startup. CPU registers and I/O
- are loaded only via 'undump' in the monitor. (That way it
- won't keep crashing all the time.)
-
- (1) Includes load address.
- (2) Default load address allowed.
-
-
- 5.2 Table of supported file formats.
-
- This section shows which emulators can access which file formats,
- unaltered. It is quite incomplete!
-
- Legend used in table:
- (Legend changed for fast grasp, thanks Wolfgang!)
-
- x = yes, fully supported, c = convertor provided, - = no, and
- empty = unknown.
-
- x64dsk d64 t64 p00 CBM
- X64 x c x
- PC64 1.10 - x c x c
- C64S 1.1A - x x c c
- C64Alive 0.9ah - - - - x
-
-
- 5.3 Standard data files - internal formats.
-
- This section shows the internal format used by each filetype. Most of
- it was taken from the compatibility section of the x64 manual, and was
- provided by Jouko 'Jopi' Valta. That section is based on the information
- acquired from news articles written by:
- blohm@mathematik.uni-ulm.de (Guntram Blohm)
- kbrisley@tsegw.tse.com (Kevin Brisley)
-
-
- File: ram (x64) Total Size: RAMSIZE + 4013
- ---------------------------------------------------
- Offset Bytes Description
- 0 RAMSIZE contents of the RAM
-
- The following data is not included yet:
- RAMSIZE 4096 I/O area with shadows
- 7 CPU Registers: PC (LO/HI), AC, XR, YR, PS, SP
-
-
- File: x64 Disk File Total Size: 174912
- ------------------------------------------
- Offset Bytes Description
- 0 4 Magic header: 'C',0x15, 0x41, 0x64
-
- 4 4 Header Version:
- C1541 Version Major
- C1541 Version Minor
- Device Type: 0 = 1541
- Max Tracks: 35 (from disks v1.2 upwards)
-
- 64 256 byte sectors
-
-
- File: *.d64 disk image Total Size: 174878
- ------------------------------------------
-
-
- D64 file contains all sectors as they appear on the 1541 formatted disk.
- Each sector is 256 bytes long. Error information (1 byte per sector)
- can be added in the end of file.
-
- __________________________________
- File types currently supported
-
- 174848 bytes = 35 tracks
- 175531 bytes = 35 tracks + 683 bytes error information
- 196608 bytes = 40 tracks
- 197376 bytes = 40 tracks + 768 bytes error information
-
- _______________
- Track sizes
-
- Tracks, size
- 1-17 21 sectors * 256 bytes
- 18-24 19 sectors * 256 bytes
- 25-30 18 sectors * 256 bytes
- 31-35 17 sectors * 256 bytes
- *36-40* 17 sectors * 256 bytes
-
- Tracks 36-40 are non-standard.
-
- ____________________________________
- Actual layout for 35 track image
-
- Offset, size, description
- 0*256, 256 track 1, sector 0
- 1*256, 256 track 1, sector 1
- ...
- 20*256, 256 track 1, sector 20
- 21*256, 256 track 2, sector 0
- ...
- 682*256, 256 track 35, sector 16
- 683*256, 683 error info (byte per sector in the same order)
-
- Sectors are 256 bytes. Sector 0 is at offset $00000 in the .d64 file.
- Sector 1 is at offset $00100 in the .d64 file, and so on.
-
- A normal 1541-format disk is divided into 4 'zones' -
- zone 1 = tracks 1-17 with 21 sectors (numbered 0-20)
- zone 2 = tracks 18-24 with 19 sectors (numbered 0-18)
- zone 3 = tracks 25-30 with 18 sectors (numbered 0-17)
- zone 4 = tracks 31-35 with 17 sectors (numbered 0-16)
-
- The directory lies on track 18. The following info is for
- track 18 -
- sector 0 = Block Availability Map (bytes 00-8f, bitmapped)
- bytes 90-9f = disk name (16 chars, space padded)
- The first 2 bytes are track and sector to the
- first directory block. Usually the first directory
- block is the very next block on the disk
- directory blocks:
- byte 0 = track of next directory block
- byte 1 = sector of next directory block
- bytes 2-31 = file entry #1
- bytes 32-33 = unused (should be 0)
- bytes 34-63 = file entry #2
- bytes 64-65 = unused, etc etc
- The first byte of a file entry is the type of file ($82 = PRG,
- $81 = SEQ, $83 = USR, $80 = DEL, $84 = REL). The next two bytes
- point to the track & sector of the first sector of the file.
- The next 16 bytes is the filename (padded). The last two bytes
- (i.e. bytes 30 & 31) gives the block count of the file (in low
- byte/high byte format).
-
- Each file block has 254 bytes of data, unless it is the last block. The
- first 2 bytes of each block are the track and sector of the next block.
- If the track is zero then this is the last block, and the sector # really
- tells the number of bytes used out of the 254 possible. The use count is
- the number of bytes used plus 1--so if the sector # has a $05, then really
- only $04 bytes were used out of the last block.
-
- The directory is at offset $16500 in the .d64 files. Tracks references
- start at 1. Sector references start at 0. So if the first 2 bytes of a
- block are $06 04, the absolute location is at
- 5 * $1500 + 4 * $100.
- (5 because that's $06 minus 1. $1500 because at track $06 there are 21
- sectors per track, or $1500 bytes. 4 because that is the sector number,
- and $100 because that's the number of bytes in a sector.)
-
- The disk has a total of 35 tracks. There are 17 trachs with 21 sectors (357
- sectors total), 7 tracks with 19 sectors (133 sectors total), 6 tracks
- with 18 sectors (108 sectors total), and 5 tracks with 17 sectors (85
- sectors total). So total sectors per disk (or .d64 image) is
- 357+133+108+85 = 683 total, or 174,848 bytes total, which is the exact
- size of the .d64 files.
-
-
- File: *.t64 tape image Total Size: Varies
- ------------------------------------------
- Offset Bytes Description
- 0 64 Tape Record:
- 0 32 Tape description + EOF (for type)
- 32 2 Tape version: $0100
- 34 2 Max number of files, in LO/HI
- 36 2 Number of existing files, in LO/HI
- 38 2 -
- 40 24 User description, as displayed in file menu
-
- 64 32*n File Record(s) for each of n files:
- +0 1 Slot allocation flag:
- 00 = free entry
- 01 = normal tape file
- 03 = memory snapshot v0.9, uncompressed
- 02..FF = reserved for memory snapshots
- +1 1 File type
- +2 2 Start address in C64 memory, in LO/HI
- +4 2 End address in C64 memory, in LO/HI
- +6 2 -
- +8 4 File start address on the image, in LO/HI
- +12 4 -
- +16 16 C64 filename
-
- 64+32*n ??? File contents.
-
-
- Wolfgang Lorenz (author of PC64) posted the following in an open letter
- to Miha Peternel (author of C64S). AFAIK there's been no reply.
-
- There is some ambiguity in the T64 file format. Could you please make a
- statement if the following assumptions are correct?
-
- Tape Record
-
- Offset, size, description
- 0, 32 DOS tape description, ASCII charset, contains either
- "C64S tape file",13,10,"Demo tape",26,"......" (no 0!) or
- "C64S tape image file",0,0,0,0,0,0,0,0,0,0,0,0 or
- "C64 tape image file",13,10,0,0,0,0,0,0,0,0,0,0,0
- To identify a T64 file, search for the sub-strings "C64" and
- "tape".
- 32, 2 tape version, currently $0100 or $0101
- 34, 2 number of directory entries, mostly $001E
- 36, 2 number of used entries (0 for unknown)
- 38, 2 free
- 40, 24 user description as displayed in tape menu, CBM charset,
- padded with space
-
- File Record
-
- Offset, size, description
- 0, 1 entry type
- 0 = free entry
- 1 = normal tape file
- 3 = memory snapshot v0.9, uncompressed
- 2..255 reserved (for memory snapshots...)
- 1, 1 C64 secondary address, mostly 1
- 2, 2 start address
- 4, 2 end address
- 6, 2 free
- 8, 4 offset of file contents start within T64 file
- 12, 4 free
- 16, 16 C64 file name, CBM charset, padded with space
-
- Example Structure Definitions for C and C++
-
- struct {
- char acTag[32];
- word wVersion;
- word wEntries;
- word wUsedEntries;
- word wReserved;
- byte abName[24];
- } T64Header;
-
- struct {
- byte bType;
- byte bSecAdr;
- word wStartAdr;
- word wEndAdr;
- word wReserved;
- long lOffset;
- long lReserved;
- byte abName[16];
- } T64Entry;
-
-
- File: CBM Files Total Size: Varies
- ---------------------------------------
- Offset Bytes Description
- 0 2 Load address in LO/HI format.
-
-
- File: *.p00 file image Total Size: Varies
- ------------------------------------------
- Offset Bytes Description
- 0 9 String "C64File" terminated by 00.
- 9 17 Original C64 Filename.
- 10 1 Record size for REL files.
- 26 Original file
-
-
- 5.4 Converting between file formats.
-
- Instructions on how to interconvert between all of the formats used
- by the various C64 emulators.
-
- One thing to keep in mind is that there are some 'all in one' conversion
- programs which convert from any format to another; 64Copy is an example.
-
- Formats:
-
- 1) .d64 - Disk image used by C64s
- 2) .t64 - Tape image used by C64s
- 3) .p00 - image format used by PC64
-
- Conversions:
-
- 1) .p00 to .t64
- a) Start PC64
- b) First get a "Manager" window up
- c) Place the cursor on the *.P00 file you want converted
- d) Then use "Manager/Export" (ALT-M-E). This will save it as a *.PRG.
- e) Then use MAKETAPE.EXE to make a *.t64 file.
-
- 2) .t64 to .p00
- Use t64top00.exe, which comes with PC64 and creates p00 copies of all the
- t64 files in a directory tree.
-
-